# Generated by Django 4.1.7 on 2023-06-19 08:45

import check.models
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ("check", "0024_interfacescomments_datetime"),
    ]

    operations = [
        migrations.CreateModel(
            name="DeviceMedia",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "file",
                    models.FileField(upload_to=check.models.get_device_media_path),
                ),
                ("description", models.CharField(max_length=256)),
                ("mod_time", models.DateTimeField(auto_now=True)),
                (
                    "device",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="medias",
                        to="check.devices",
                    ),
                ),
            ],
            options={
                "verbose_name": "Медиафайл",
                "verbose_name_plural": "Медиафайлы",
                "db_table": "device_media",
            },
        ),
    ]
